    	     <?
	     if($file==''):
                 
                $fn=Yii::app()->request->baseUrl.'/themes/'. Yii::app()->theme->name.'/images/foto_zagl';
             $zaglname='.png';
                 if (($width!='') && ($height!=''))
                 {                     
                     if  (file_exists(yii::getPathOfAlias('webroot') . DIRECTORY_SEPARATOR.'themes'.DIRECTORY_SEPARATOR.Yii::app()->theme->name.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'foto_zagl'.$width.'x'.$height.$zaglname))     
                     {
                       
                         $zaglname=$width.'x'.$height.$zaglname;
                     }
                 }
            
                                    
                 // $img =  ImageHelper::thumb($width,$height,'/' . $files['image_path'],array('method' => $thumbMethod));
	     	print '<img src="' . $fn.$zaglname.'" width="'.$width.'" height="'.$height.'" alt="No photo" border="0">';
	     else:?>

	     <?php

		//  $img = 'http://'.$_SERVER['HTTP_HOST'].Yii::app()->request->baseUrl.
		 
		  echo  '<img border=0 src="'.$imgurl.$file. '" width="'.$width.'"  height="'.$height.'" class="firstOnly">';
                  
		 ?>

		 <?endif;?>